#ifndef ANALYEXCELCOMPARE_H
#define ANALYEXCELCOMPARE_H
#include <QMutex>
#include <QtWidgets>
#include <QAxObject>
#include "tools/Gadget.h"
#include "solar/beacon/Field.h"

class ExcelCompare : public QObject, public QRunnable{

    Q_OBJECT

public:

    ExcelCompare(QMap<QString, QList<QString>> &RdoMapListChar, QMap<QString, QList<QList<QString>>> &RdoMapListNestChar, bool caseSensitive=true);

    void run();

private:
    QMap<int, QString> colMap;
    QMap<QString, QList<QString>> *RdoMap_ListChar;
    QMap<QString, QList<QList<QString>>> *RdoMap_ListNestChar;
    bool _caseSensitive;
    Extend definfc;
    QMutex CPR_Mutex;

    QMap<QString, QString> compareExcelMap(QMap<QString, QString> &_T, QMap<QString, QString> &_P);

    void open(QAxObject *device, QString _file, QStringList _sheet, QStringList col, QMap<QString, QMap<QString, QMap<QString, QStringList>>> &get);

 signals:

     void process(int);
     void ST_Value(QString);
     void finish(bool);

};

#endif
